home *** CD-ROM | disk | FTP | other *** search
/ APDL Other Worlds / APDL Other Worlds Collection.iso / SF3000 / Extras / CBlibrary / h / SprFormats < prev    next >
Encoding:
Text File  |  2003-09-09  |  2.3 KB  |  78 lines

  1. /*
  2.  * CBLibrary - SprFormats
  3.  * Copyright (C) 2003  Chris Bazley
  4.  *
  5.  * This library is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU Lesser General Public
  7.  * License as published by the Free Software Foundation; either
  8.  * version 2.1 of the License, or (at your option) any later version.
  9.  *
  10.  * This library is distributed in the hope that it will be useful,
  11.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.  * Lesser General Public License for more details.
  14.  *
  15.  * You should have received a copy of the GNU Lesser General Public
  16.  * License along with this library; if not, write to the Free Software
  17.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18.  */
  19.  
  20. /* Sprite area data structures & constants */
  21.  
  22. #ifndef SprFormats_h
  23. #define SprFormats_h
  24.  
  25. /* Modifiers for OS_SpriteOp reason code (add one) */
  26. #define SPRITEOP_SYSTEMAREA       0
  27. #define SPRITEOP_USERAREA_SPRNAME (1u << 8)
  28. #define SPRITEOP_USERAREA_SPRPTR  (1u << 9)
  29.  
  30. /* Error numbers */
  31. #define SPRITE_ERR_CREATEMEM   0x82
  32. #define SPRITE_ERR_MEMORY      0x85
  33. #define SPRITE_ERR_DOESNTEXIST 0x86
  34.  
  35. /* OS_SpriteOp reason codes */
  36. #define SPRITEOP_READCTRLBLOCK       8
  37. #define SPRITEOP_INIT_AREA           9
  38. #define SPRITEOP_LOAD_AREA           10
  39. #define SPRITEOP_MERGE_AREA          11
  40. #define SPRITEOP_SAVE_AREA           12
  41. #define SPRITEOP_GET_SPR             14
  42. #define SPRITEOP_CREATE              15
  43. #define SPRITEOP_GET_SPR_COORDS      16
  44. #define SPRITEOP_VERIFY_AREA         17
  45. #define SPRITEOP_DELETE              25
  46. #define SPRITEOP_PLOT                28
  47. #define SPRITEOP_CREATE_MASK         29
  48. #define SPRITEOP_PLOTCOORDS          34
  49. #define SPRITEOP_SETPTRSHAPE         36
  50. #define SPRITEOP_READINFO            40
  51. #define SPRITEOP_READPIXCOL          41
  52. #define SPRITEOP_PLOTSCALED          52
  53. #define SPRITEOP_SWITCHOUTPUT_SPRITE 60
  54. #define SPRITEOP_SWITCHOUTPUT_MASK   61
  55.  
  56. typedef struct
  57. {  int size;
  58.    int sprite_count;
  59.    int first;
  60.    int used;
  61.    int extension_words[];
  62. } spriteareaheader;
  63.  
  64. typedef struct
  65. {  int  size;
  66.    char name[12];
  67.    int  width;
  68.    int  height;
  69.    int  left_bit;
  70.    int  right_bit;
  71.    int  image;
  72.    int  mask;
  73.    int  type;
  74.    int  palette_data[];
  75. } spriteheader;
  76.  
  77. #endif
  78.